<template>
	<div>
		<div class="header">
	        <em>小莱电影</em>
	    </div>
	    <div class="m-title">
	        <h3>影片</h3>
	    </div>
	    <div class="container">
	    	<div class="movie-list" v-for="movie in movielist">
	    		<router-link :to="{path:'/detail',query:{id:movie.MovieID,name:movie.Name,img:movie.ImgUrl,type:movie.Tyep,actors:movie.Actors,rate:movie.Rate,intro:movie.Intro,ReleaseTime:movie.ReleaseTime}}">
	    			<div class="movie-img"><img v-bind:src="'http://film.glkjjt.com/'+movie.ImgUrl"/></div>
	    			<div class="movie-info">
	    				<div class="hd">
	    					<h2>{{movie.Name}}</h2>
	    					<div class="movie-type"><span>2D</span><span>IMAX</span></div>
	    				</div>
	    				<p>{{movie.Type}}</p>
	    				<p>{{movie.Actors}}</p>
	    			</div>
	    			<div class="grade">
	    				{{movie.Rate}}
	    			</div>
	    			<div class="buy"><a href="#">购票</a></div>
	    		</router-link>
	    	</div>
	   </div>
	</div>
</template>

<script>
	export default{
		data(){
			return{
				qx:{
				    	Name:"少年的你",
				    	Type:"剧情,爱情",
				    	Actors:"易烊千玺 周冬雨",
				    	Rate:10
				   },
				movielist:[
				    
				]
			}
		},
		created(){
			this.$http.get("http://film.glkjjt.com/api/Movie/New")
			.then(res=>{
				console.log(res.data)
				this.movielist=res.data
                this.movielist.push(this.qx)
                
			})
			.catch(err=>{
				console.log(err)
			})
		}
	}
</script>

<style>
</style>